home *** CD-ROM | disk | FTP | other *** search
- bool
- do_aexec(really,arglast)
- STR *really;
- int *arglast;
- {
- register STR **st = stack->ary_array;
- register int sp = arglast[1];
- register int items = arglast[2] - sp;
- register char **a;
- char *tmps;
-
- if (items) {
- New(401,Argv, items+1, char*);
- a = Argv;
- for (st += ++sp; items > 0; items--,st++) {
- if (*st)
- *a++ = str_get(*st);
- else
- *a++ = "";
- }
- *a = Nullch;
- #ifdef TAINT
- if (*Argv[0] != '/') /* will execvp use PATH? */
- taintenv(); /* testing IFS here is overkill, probably */
- #endif
- if (really && *(tmps = str_get(really)))
- execvp(tmps,Argv);
- else
- execvp(Argv[0],Argv);
- }
- do_execfree();
- return FALSE;
- }
-
-